home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_337 / cmanual / graphics.lzh / Graphics / Example8.c < prev    next >
C/C++ Source or Header  |  1990-01-30  |  20KB  |  431 lines

  1. /* Example8                                                            */
  2. /* This program will open a normal window which is connected to a      */
  3. /* 16-colour Custom screen. In the window we will draw the Amiga Logo. */
  4.  
  5.  
  6.  
  7. /* If your program is using Intuition you should include intuition.h: */
  8. #include <intuition/intuition.h>
  9.  
  10.  
  11.  
  12. struct IntuitionBase *IntuitionBase;
  13. struct GfxBase *GfxBase;
  14.  
  15.  
  16.  
  17. /* Declare a pointer to a Screen structure: */ 
  18. struct Screen *my_screen;
  19.  
  20. /* Declare and initialize your NewScreen structure: */
  21. struct NewScreen my_new_screen=
  22. {
  23.   0,            /* LeftEdge  Should always be 0. */
  24.   0,            /* TopEdge   Top of the display.*/
  25.   320,          /* Width     We are using a low-resolution screen. */
  26.   200,          /* Height    Non-Interlaced NTSC (American) display. */
  27.   4,            /* Depth     16 colours. */
  28.   0,            /* DetailPen Text should be printed with colour reg. 0 */
  29.   1,            /* BlockPen  Blocks should be printed with colour reg. 1 */
  30.   NULL,         /* ViewModes Low-resolution. (Non-Interlaced) */
  31.   CUSTOMSCREEN, /* Type      Your own customized screen. */
  32.   NULL,         /* Font      Default font. */
  33.   "N I C E",    /* Title     The screen's title. */
  34.   NULL,         /* Gadget    Must for the moment be NULL. */
  35.   NULL          /* BitMap    No special CustomBitMap. */
  36. };
  37.  
  38.  
  39.  
  40. /* Declare a pointer to a Window structure: */ 
  41. struct Window *my_window;
  42.  
  43. /* Declare and initialize your NewWindow structure: */
  44. struct NewWindow my_new_window=
  45. {
  46.   20,            /* LeftEdge    x position of the window. */
  47.   20,            /* TopEdge     y position of the window. */
  48.   147,           /* Width       147 pixels wide. */
  49.   63,            /* Height      63 lines high. */
  50.   0,             /* DetailPen   Text should be drawn with colour reg. 0 */
  51.   1,             /* BlockPen    Blocks should be drawn with col. reg. 1 */
  52.   NULL,          /* IDCMPFlags  No IDCMP flags. */
  53.   SMART_REFRESH| /* Flags       Intuition should refresh the window. */
  54.   WINDOWDRAG|    /*             Drag gadget. */
  55.   WINDOWDEPTH|   /*             Depth arrange Gadgets. */
  56.   ACTIVATE,      /*             The window should be Active when opened. */
  57.   NULL,          /* FirstGadget No Custom Gadgets. */
  58.   NULL,          /* CheckMark   Use Intuition's default CheckMark (v). */
  59.   "AMIGA!",      /* Title       Title of the window. */
  60.   NULL,          /* Screen      We will later connect it to the screen. */
  61.   NULL,          /* BitMap      No Custom BitMap. */
  62.   0,             /* MinWidth    We do not need to care about these */
  63.   0,             /* MinHeight   since we have not supplied the window */
  64.   0,             /* MaxWidth    with a Sizing Gadget. */
  65.   0,             /* MaxHeight */
  66.   CUSTOMSCREEN   /* Type        Connected to a Custom screen. */
  67. };
  68.  
  69.  
  70.  
  71.  
  72. /* Here is the data for the Amiga Logo: */
  73. /* REMEMBER! Image data MUST be placed in chip-memory! */
  74. SHORT chip amiga_logo_data[]=
  75. {
  76.   /* BitPlane ZERO */
  77.   0xFFFF,0xFFFF,0xFFF8,0x080F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  78.   0xFFFF,0xFFFF,0xFFF0,0x101F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  79.   0xFFFF,0xFFFF,0xFFF0,0x101F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  80.   0xFFFF,0xFFFF,0xFFE0,0x203F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  81.   0xFFFF,0xFFFF,0xFFC0,0x407F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  82.   0xFFFF,0xFFFF,0xFFC0,0x407F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  83.   0xFFFF,0xFFFF,0xFF80,0x80FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  84.   0xFFFF,0xFFFF,0xFF7D,0x7DFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  85.   0xFFFF,0xFFFF,0xFF7D,0x7DFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  86.   0xFFFF,0xFFFF,0xFEFA,0xFBFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  87.   0xFFFF,0xFFFF,0xFDF5,0xF7FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  88.   0xFFFF,0xFFFF,0xFC04,0x07FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  89.   0xFFFF,0xFFFF,0xF808,0x0FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  90.   0xFFFF,0xFFFF,0xF808,0x0FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  91.   0xFFFF,0xFFFF,0xF010,0x1FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  92.   0xFFFF,0xFFFF,0xE020,0x3FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  93.   0xFFFF,0xFFFF,0xEFAF,0xBFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  94.   0xFFFF,0xFFFF,0xDF5F,0x7FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  95.   0xFFFF,0xFFFF,0xBEBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  96.   0xFFFF,0xFFFF,0xBEBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  97.   0xFFFF,0xFFFF,0x7D7D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  98.   0xFFFF,0xFFFE,0x0203,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  99.   0xFFFF,0xFFFE,0x0203,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  100.   0xFFFF,0xFFFC,0x0407,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  101.   0xFFFF,0xFFF8,0x080F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  102.   0xFFFF,0xFFF8,0x080F,0x8FF8,0x00FF,0x0060,0x03FE,0x00FF,0xFC7F,
  103.   0xFFFF,0xFFF0,0x101F,0x07FC,0x007E,0x0030,0x01F8,0x007F,0xF83F,
  104.   0xFFFF,0xFFE0,0x203F,0x07FE,0x007E,0x0078,0x03E0,0x003F,0xF83F,
  105.   0xFFFF,0xFFEF,0xAFBE,0x07FE,0x00FC,0x01F0,0x0F80,0xFE3F,0xF03F,
  106.   0xFFFF,0xFFDF,0x5F7C,0x07FC,0x00F8,0x01F0,0x0F03,0xFE3F,0xE03F,
  107.   0x0101,0xFFBE,0xBEF8,0x07FC,0x00F8,0x01F0,0x0E07,0xFF7F,0xC03F,
  108.   0xBEBE,0xFFBE,0xBEF8,0x07FC,0x00F0,0x01F0,0x0C0F,0xFFFF,0xC03F,
  109.   0xBEBE,0xFF7D,0x7DF0,0x07FC,0x00F0,0x03E0,0x181F,0xFFFF,0x803F,
  110.   0xDF5F,0x7EFA,0xFBE0,0x07F8,0x00E0,0x03E0,0x101F,0xFFFF,0x003F,
  111.   0xEFAF,0xBEFA,0xFBE0,0x07F8,0x80C2,0x03E0,0x003F,0xFFFF,0x003F,
  112.   0xEFAF,0xBDF5,0xF7C0,0x07F8,0x80C0,0x03E0,0x003F,0xFFFE,0x003F,
  113.   0xF7D7,0xDBEB,0xEF80,0x07F8,0x8084,0x07C0,0x203F,0xFFFC,0x003F,
  114.   0xFBEB,0xEBEB,0xEF04,0x07F0,0x800C,0x07C0,0x007E,0x00F8,0x203F,
  115.   0xFBEB,0xE010,0x1F0C,0x07F1,0x8008,0x07C0,0x007F,0x0078,0x603F,
  116.   0xFC04,0x0010,0x1E00,0x07F1,0x8018,0x07C0,0x007F,0x80F0,0x003F,
  117.   0xFE02,0x0020,0x3C00,0x07F1,0x8038,0x0F80,0x607F,0x81E0,0x003F,
  118.   0xFF01,0x0040,0x7C00,0x07E1,0x8070,0x0F80,0x607F,0x81E0,0x003F,
  119.   0xFF01,0x1F5F,0x783C,0x07E3,0x8070,0x0F80,0x707F,0x81C1,0xE03F,
  120.   0xFF80,0xBEBE,0xF07C,0x07E3,0x80F0,0x0F80,0x703F,0x8183,0xE03F,
  121.   0xFFDF,0x7D7D,0xE0FC,0x07E3,0x81F0,0x1F00,0xF83F,0x8107,0xE03F,
  122.   0xFFDF,0x7D7D,0xE1FC,0x07C3,0x81E0,0x1F00,0xFC1F,0x810F,0xE03F,
  123.   0xFFEE,0x0203,0xC1FC,0x07C7,0x83E0,0x1F00,0xFE1F,0x000F,0xE03F,
  124.   0xFFF0,0x0407,0x01F0,0x0303,0x8780,0x0C00,0x7F00,0x000F,0x801F,
  125.   0xFFF0,0x0406,0x00E0,0x0001,0xC700,0x0000,0x3F80,0x0007,0x000F,
  126.   0xFFF8,0x080F,0x0070,0x0000,0xEF80,0x0000,0x1FE0,0x3803,0x8007,
  127.  
  128.   /* BitPlane ONE */
  129.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  130.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  131.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  132.   0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
  133.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  134.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  135.   0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
  136.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  137.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  138.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  139.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  140.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  141.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  142.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  143.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  144.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  145.   0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
  146.   0x0000,0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  147.   0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  148.   0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  149.   0x0000,0x0000,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  150.   0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  151.   0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  152.   0x0000,0x0001,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  153.   0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  154.   0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  155.   0x0000,0x0007,0xC7C0,0x0800,0x0080,0x00C8,0x0600,0x0000,0x0040,
  156.   0x0000,0x000F,0x8F80,0x0800,0x0180,0x0380,0x1C01,0xFE40,0x0040,
  157.   0x0000,0x0000,0x0000,0x0800,0x0100,0x0200,0x1007,0x0040,0x0040,
  158.   0x0000,0x0000,0x0000,0x0800,0x0100,0x0200,0x100C,0x00C0,0x0040,
  159.   0x0000,0x0000,0x0000,0x0800,0x8100,0x0200,0x1018,0x0080,0x0040,
  160.   0x3E3E,0x0000,0x0000,0x0800,0x8100,0x0600,0x3030,0x0000,0x0040,
  161.   0x3E3E,0x0000,0x0000,0x0800,0x8102,0x0400,0x2020,0x0000,0x0040,
  162.   0x1F1F,0x0000,0x0000,0x0801,0x8106,0x0400,0x2060,0x0000,0x0040,
  163.   0x0F8F,0x8000,0x0000,0x0801,0x0104,0x0400,0x2040,0x0000,0x0040,
  164.   0x0F8F,0x8000,0x0004,0x0801,0x010C,0x0C00,0x6040,0x0000,0x2040,
  165.   0x07C7,0xC000,0x000C,0x0801,0x0118,0x0800,0x40C0,0x0000,0x6040,
  166.   0x03E3,0xE000,0x0018,0x0803,0x0110,0x0800,0x4080,0x0000,0xC040,
  167.   0x03E3,0xE000,0x0010,0x0802,0x0030,0x0800,0x4080,0x0180,0x8040,
  168.   0x0000,0x0000,0x0000,0x0802,0x0060,0x1800,0xC080,0x0300,0x0040,
  169.   0x0000,0x0000,0x0000,0x0802,0x00C0,0x1000,0x8080,0x0200,0x0040,
  170.   0x0000,0x0000,0x007C,0x0806,0x0080,0x1000,0x8080,0x0203,0xE040,
  171.   0x0000,0x1F1F,0x00C0,0x0804,0x0180,0x1000,0x8000,0x0206,0x0040,
  172.   0x0000,0x3E3E,0x0180,0x0804,0x0300,0x3001,0x8040,0x020C,0x0040,
  173.   0x0000,0x7C7C,0x0300,0x0804,0x0200,0x2001,0x0000,0x0218,0x0040,
  174.   0x0000,0x7C7C,0x0200,0x080C,0x0600,0x2001,0x0020,0x0210,0x0040,
  175.   0x0000,0xF8F8,0x0600,0x0808,0x0C00,0x2001,0x0000,0x0630,0x0040,
  176.   0x0005,0xF1F0,0x0000,0x0000,0x0800,0x0000,0x0000,0x1800,0x0000,
  177.   0x0005,0xF1F0,0x0000,0x0000,0x1800,0x0000,0x0040,0x7000,0x0000,
  178.   0x0000,0x0000,0xFF8F,0xFFFF,0x107F,0xFFFF,0xE01F,0xC7FC,0x7FF8,
  179.  
  180.   /* BitPlane TWO */
  181.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  182.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  183.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  184.   0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
  185.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  186.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  187.   0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
  188.   0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
  189.   0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
  190.   0x0000,0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,
  191.   0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
  192.   0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
  193.   0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
  194.   0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
  195.   0x0000,0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,
  196.   0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
  197.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  198.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  199.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  200.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  201.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  202.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  203.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  204.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  205.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  206.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  207.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  208.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  209.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  210.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  211.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  212.   0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  213.   0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  214.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  215.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  216.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  217.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  218.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  219.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  220.   0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  221.   0x00F8,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  222.   0x007C,0x4000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  223.   0x007C,0x5F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  224.   0x003E,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  225.   0x001F,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  226.   0x001F,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  227.   0x000E,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  228.   0x0005,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  229.   0x0005,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  230.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  231.  
  232.   /* BitPlane THREE */
  233.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  234.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  235.   0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
  236.   0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
  237.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  238.   0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
  239.   0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
  240.   0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
  241.   0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
  242.   0x0000,0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,
  243.   0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
  244.   0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
  245.   0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
  246.   0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
  247.   0x0000,0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,
  248.   0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
  249.   0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
  250.   0x0000,0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  251.   0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  252.   0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  253.   0x0000,0x0000,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  254.   0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  255.   0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  256.   0x0000,0x0001,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  257.   0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  258.   0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  259.   0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  260.   0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  261.   0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  262.   0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  263.   0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  264.   0x3E3E,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  265.   0x3E3E,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  266.   0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  267.   0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  268.   0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  269.   0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  270.   0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  271.   0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  272.   0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  273.   0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  274.   0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  275.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  276.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  277.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  278.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  279.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  280.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  281.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  282.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  283. };
  284.  
  285.  
  286.  
  287. /* Image structure for the Amiga Logo image: */
  288. struct Image amiga_logo=
  289. {
  290.   0, 0,            /* LeftEdge, TopEdge. */
  291.   141,             /* Width, 141 pixels wide. */
  292.   50,              /* Height, 50 lines high. */
  293.   4,               /* Depth, four Bitplanes, 16 colours. */
  294.   amiga_logo_data, /* ImageData, pointer to king_tut_data. */
  295.   0x000F,          /* PickPlane, Bitplane 0,1,2 and 3 affected. */
  296.   0x0000,          /* PlaneOnOff, all Bitplanes are already "picked". */
  297.   NULL             /* NextImage, no more Images. */
  298. };
  299.  
  300.  
  301.  
  302. main()
  303. {
  304.   /* Open the Intuition Library: */
  305.   IntuitionBase = (struct IntuitionBase *)
  306.     OpenLibrary( "intuition.library", 0 );
  307.   
  308.   if( IntuitionBase == NULL )
  309.     exit(); /* Could NOT open the Intuition Library! */
  310.  
  311.  
  312.  
  313.   /* Open the Graphics Library: */
  314.   GfxBase = (struct GfxBase *)
  315.     OpenLibrary( "graphics.library", 0 );
  316.  
  317.   if( GfxBase == NULL )
  318.   {
  319.     /* Could NOT open the Graphics Library! */
  320.  
  321.     /* Close the Intuition Library since we have opened it: */
  322.     CloseLibrary( IntuitionBase );
  323.  
  324.     exit();
  325.   }
  326.  
  327.  
  328.  
  329.   /* We will now try to open the screen: */
  330.   my_screen= (struct Screen *) OpenScreen( &my_new_screen );
  331.   
  332.   /* Have we opened the screen succesfully? */
  333.   if(my_screen == NULL)
  334.   {
  335.     /* Could NOT open the Screen! */
  336.  
  337.     /* Close the Graphics Library since we have opened it: */
  338.     CloseLibrary( GfxBase );
  339.  
  340.     /* Close the Intuition Library since we have opened it: */
  341.     CloseLibrary( IntuitionBase );
  342.  
  343.     exit();  
  344.   }
  345.  
  346.  
  347.  
  348.   /******************************************************************/
  349.   /* We are here using the function SetRGB4() to change the Custom  */
  350.   /* screen's colour. You should not bother about this function yet */
  351.   /* since it has nothing to do with Intuition. It is actually a    */
  352.   /* low-level graphic function (that is why we needed to open the  */
  353.   /* Graphics Library) which will be discussed later.               */
  354.   /******************************************************************/
  355.  
  356.   SetRGB4( &my_screen->ViewPort,  0, 0x0, 0x0, 0x0 );
  357.   SetRGB4( &my_screen->ViewPort,  1, 0xF, 0xE, 0xD );
  358.   SetRGB4( &my_screen->ViewPort,  2, 0x9, 0x9, 0x9 );
  359.   SetRGB4( &my_screen->ViewPort,  3, 0x0, 0x0, 0xF );
  360.   SetRGB4( &my_screen->ViewPort,  4, 0x0, 0x8, 0xF );
  361.   SetRGB4( &my_screen->ViewPort,  5, 0x0, 0xB, 0xA );
  362.   SetRGB4( &my_screen->ViewPort,  6, 0x0, 0xF, 0x0 );
  363.   SetRGB4( &my_screen->ViewPort,  7, 0xA, 0xF, 0x0 );
  364.  
  365.   SetRGB4( &my_screen->ViewPort,  8, 0xD, 0xF, 0x0 );
  366.   SetRGB4( &my_screen->ViewPort,  9, 0xF, 0xF, 0x0 );
  367.   SetRGB4( &my_screen->ViewPort, 10, 0xF, 0xC, 0x0 );
  368.   SetRGB4( &my_screen->ViewPort, 11, 0xF, 0xA, 0x0 );
  369.   SetRGB4( &my_screen->ViewPort, 12, 0xF, 0x7, 0x0 );
  370.   SetRGB4( &my_screen->ViewPort, 13, 0xF, 0x5, 0x0 );
  371.   SetRGB4( &my_screen->ViewPort, 14, 0xF, 0x2, 0x0 );
  372.   SetRGB4( &my_screen->ViewPort, 15, 0x8, 0x0, 0xF );
  373.  
  374.  
  375.  
  376.   /* Before we can open the window we need to give the NewWindow */
  377.   /* structure a pointer to the opened Custom Screen: */
  378.   my_new_window.Screen = my_screen;
  379.  
  380.  
  381.  
  382.   /* We will now try to open the window: */
  383.   my_window = (struct Window *) OpenWindow( &my_new_window );
  384.   
  385.   /* Have we opened the window succesfully? */
  386.   if(my_window == NULL)
  387.   {
  388.     /* Could NOT open the Window! */
  389.     
  390.     /* Close the screen since we have opened it: */
  391.     CloseScreen( my_screen );
  392.  
  393.     /* Close the Graphics Library since we have opened it: */
  394.     CloseLibrary( GfxBase );
  395.  
  396.     /* Close the Intuition Library since we have opened it: */
  397.     CloseLibrary( IntuitionBase );
  398.  
  399.     exit();  
  400.   }
  401.  
  402.  
  403.  
  404.   /* Tell Intuition to draw the Amiga Logo Image: */
  405.   DrawImage( my_window->RPort, &amiga_logo, 3, 11 );
  406.  
  407.  
  408.  
  409.   /* Wait for 30 seconds: */
  410.   Delay( 50 * 30);
  411.  
  412.  
  413.  
  414.   /* We should always close the windows we have opened before we leave: */
  415.   CloseWindow( my_window );
  416.  
  417.   /* Remember that all windows connected to a screen must be closed */
  418.   /* before you may close the screen! */
  419.   CloseScreen( my_screen );
  420.  
  421.  
  422.  
  423.   /* Close the Graphics Library since we have opened it: */
  424.   CloseLibrary( GfxBase );
  425.  
  426.   /* Close the Intuition Library since we have opened it: */
  427.   CloseLibrary( IntuitionBase );
  428.   
  429.   /* THE END */
  430. }
  431.